<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>cgemm.f</title>
 <meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!-- 
body { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default   { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default a { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.string   { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.string a { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.comment   { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.comment a { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
 --></style>

 </head>
  <body>

<pre>
      SUBROUTINE <a name="CGEMM.1"></a><a href="cgemm.f.html#CGEMM.1">CGEMM</a>(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
<span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      COMPLEX ALPHA,BETA
      INTEGER K,LDA,LDB,LDC,M,N
      CHARACTER TRANSA,TRANSB
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Purpose
</span><span class="comment">*</span><span class="comment">  =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="CGEMM.14"></a><a href="cgemm.f.html#CGEMM.1">CGEMM</a>  performs one of the matrix-matrix operations
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     C := alpha*op( A )*op( B ) + beta*C,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where  op( X ) is one of
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     op( X ) = X   or   op( X ) = X'   or   op( X ) = conjg( X' ),
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  alpha and beta are scalars, and A, B and C are matrices, with op( A )
</span><span class="comment">*</span><span class="comment">  an m by k matrix,  op( B )  a  k by n matrix and  C an m by n matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Arguments
</span><span class="comment">*</span><span class="comment">  ==========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  TRANSA - CHARACTER*1.
</span><span class="comment">*</span><span class="comment">           On entry, TRANSA specifies the form of op( A ) to be used in
</span><span class="comment">*</span><span class="comment">           the matrix multiplication as follows:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANSA = 'N' or 'n',  op( A ) = A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANSA = 'T' or 't',  op( A ) = A'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANSA = 'C' or 'c',  op( A ) = conjg( A' ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  TRANSB - CHARACTER*1.
</span><span class="comment">*</span><span class="comment">           On entry, TRANSB specifies the form of op( B ) to be used in
</span><span class="comment">*</span><span class="comment">           the matrix multiplication as follows:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANSB = 'N' or 'n',  op( B ) = B.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANSB = 'T' or 't',  op( B ) = B'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">              TRANSB = 'C' or 'c',  op( B ) = conjg( B' ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  M      - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry,  M  specifies  the number  of rows  of the  matrix
</span><span class="comment">*</span><span class="comment">           op( A )  and of the  matrix  C.  M  must  be at least  zero.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  N      - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry,  N  specifies the number  of columns of the matrix
</span><span class="comment">*</span><span class="comment">           op( B ) and the number of columns of the matrix C. N must be
</span><span class="comment">*</span><span class="comment">           at least zero.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  K      - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry,  K  specifies  the number of columns of the matrix
</span><span class="comment">*</span><span class="comment">           op( A ) and the number of rows of the matrix op( B ). K must
</span><span class="comment">*</span><span class="comment">           be at least  zero.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  ALPHA  - COMPLEX         .
</span><span class="comment">*</span><span class="comment">           On entry, ALPHA specifies the scalar alpha.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  A      - COMPLEX          array of DIMENSION ( LDA, ka ), where ka is
</span><span class="comment">*</span><span class="comment">           k  when  TRANSA = 'N' or 'n',  and is  m  otherwise.
</span><span class="comment">*</span><span class="comment">           Before entry with  TRANSA = 'N' or 'n',  the leading  m by k
</span><span class="comment">*</span><span class="comment">           part of the array  A  must contain the matrix  A,  otherwise
</span><span class="comment">*</span><span class="comment">           the leading  k by m  part of the array  A  must contain  the
</span><span class="comment">*</span><span class="comment">           matrix A.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDA    - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry, LDA specifies the first dimension of A as declared
</span><span class="comment">*</span><span class="comment">           in the calling (sub) program. When  TRANSA = 'N' or 'n' then
</span><span class="comment">*</span><span class="comment">           LDA must be at least  max( 1, m ), otherwise  LDA must be at
</span><span class="comment">*</span><span class="comment">           least  max( 1, k ).
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  B      - COMPLEX          array of DIMENSION ( LDB, kb ), where kb is
</span><span class="comment">*</span><span class="comment">           n  when  TRANSB = 'N' or 'n',  and is  k  otherwise.
</span><span class="comment">*</span><span class="comment">           Before entry with  TRANSB = 'N' or 'n',  the leading  k by n
</span><span class="comment">*</span><span class="comment">           part of the array  B  must contain the matrix  B,  otherwise
</span><span class="comment">*</span><span class="comment">           the leading  n by k  part of the array  B  must contain  the
</span><span class="comment">*</span><span class="comment">           matrix B.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDB    - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry, LDB specifies the first dimension of B as declared
</span><span class="comment">*</span><span class="comment">           in the calling (sub) program. When  TRANSB = 'N' or 'n' then
</span><span class="comment">*</span><span class="comment">           LDB must be at least  max( 1, k ), otherwise  LDB must be at
</span><span class="comment">*</span><span class="comment">           least  max( 1, n ).
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  BETA   - COMPLEX         .
</span><span class="comment">*</span><span class="comment">           On entry,  BETA  specifies the scalar  beta.  When  BETA  is
</span><span class="comment">*</span><span class="comment">           supplied as zero then C need not be set on input.
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  C      - COMPLEX          array of DIMENSION ( LDC, n ).
</span><span class="comment">*</span><span class="comment">           Before entry, the leading  m by n  part of the array  C must
</span><span class="comment">*</span><span class="comment">           contain the matrix  C,  except when  beta  is zero, in which
</span><span class="comment">*</span><span class="comment">           case C need not be set on entry.
</span><span class="comment">*</span><span class="comment">           On exit, the array  C  is overwritten by the  m by n  matrix
</span><span class="comment">*</span><span class="comment">           ( alpha*op( A )*op( B ) + beta*C ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDC    - INTEGER.
</span><span class="comment">*</span><span class="comment">           On entry, LDC specifies the first dimension of C as declared
</span><span class="comment">*</span><span class="comment">           in  the  calling  (sub)  program.   LDC  must  be  at  least
</span><span class="comment">*</span><span class="comment">           max( 1, m ).
</span><span class="comment">*</span><span class="comment">           Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Level 3 Blas routine.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- Written on 8-February-1989.
</span><span class="comment">*</span><span class="comment">     Jack Dongarra, Argonne National Laboratory.
</span><span class="comment">*</span><span class="comment">     Iain Duff, AERE Harwell.
</span><span class="comment">*</span><span class="comment">     Jeremy Du Croz, Numerical Algorithms Group Ltd.
</span><span class="comment">*</span><span class="comment">     Sven Hammarling, Numerical Algorithms Group Ltd.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      LOGICAL <a name="LSAME.132"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
      EXTERNAL <a name="LSAME.133"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Subroutines ..
</span>      EXTERNAL <a name="XERBLA.136"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC CONJG,MAX
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      COMPLEX TEMP
      INTEGER I,INFO,J,L,NCOLA,NROWA,NROWB
      LOGICAL CONJA,CONJB,NOTA,NOTB
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Parameters ..
</span>      COMPLEX ONE
      PARAMETER (ONE= (1.0E+0,0.0E+0))
      COMPLEX ZERO
      PARAMETER (ZERO= (0.0E+0,0.0E+0))
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Set  NOTA  and  NOTB  as  true if  A  and  B  respectively are not
</span><span class="comment">*</span><span class="comment">     conjugated or transposed, set  CONJA and CONJB  as true if  A  and
</span><span class="comment">*</span><span class="comment">     B  respectively are to be  transposed but  not conjugated  and set
</span><span class="comment">*</span><span class="comment">     NROWA, NCOLA and  NROWB  as the number of rows and  columns  of  A
</span><span class="comment">*</span><span class="comment">     and the number of rows of  B  respectively.
</span><span class="comment">*</span><span class="comment">
</span>      NOTA = <a name="LSAME.159"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANSA,<span class="string">'N'</span>)
      NOTB = <a name="LSAME.160"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANSB,<span class="string">'N'</span>)
      CONJA = <a name="LSAME.161"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANSA,<span class="string">'C'</span>)
      CONJB = <a name="LSAME.162"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANSB,<span class="string">'C'</span>)
      IF (NOTA) THEN
          NROWA = M
          NCOLA = K
      ELSE
          NROWA = K
          NCOLA = M
      END IF
      IF (NOTB) THEN
          NROWB = K
      ELSE
          NROWB = N
      END IF
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Test the input parameters.
</span><span class="comment">*</span><span class="comment">
</span>      INFO = 0
      IF ((.NOT.NOTA) .AND. (.NOT.CONJA) .AND.
     +    (.NOT.<a name="LSAME.180"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANSA,<span class="string">'T'</span>))) THEN
          INFO = 1
      ELSE IF ((.NOT.NOTB) .AND. (.NOT.CONJB) .AND.
     +         (.NOT.<a name="LSAME.183"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANSB,<span class="string">'T'</span>))) THEN
          INFO = 2
      ELSE IF (M.LT.0) THEN
          INFO = 3
      ELSE IF (N.LT.0) THEN
          INFO = 4
      ELSE IF (K.LT.0) THEN
          INFO = 5
      ELSE IF (LDA.LT.MAX(1,NROWA)) THEN
          INFO = 8
      ELSE IF (LDB.LT.MAX(1,NROWB)) THEN
          INFO = 10
      ELSE IF (LDC.LT.MAX(1,M)) THEN
          INFO = 13
      END IF
      IF (INFO.NE.0) THEN
          CALL <a name="XERBLA.199"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>(<span class="string">'<a name="CGEMM.199"></a><a href="cgemm.f.html#CGEMM.1">CGEMM</a> '</span>,INFO)
          RETURN
      END IF
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Quick return if possible.
</span><span class="comment">*</span><span class="comment">
</span>      IF ((M.EQ.0) .OR. (N.EQ.0) .OR.
     +    (((ALPHA.EQ.ZERO).OR. (K.EQ.0)).AND. (BETA.EQ.ONE))) RETURN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     And when  alpha.eq.zero.
</span><span class="comment">*</span><span class="comment">
</span>      IF (ALPHA.EQ.ZERO) THEN
          IF (BETA.EQ.ZERO) THEN
              DO 20 J = 1,N
                  DO 10 I = 1,M
                      C(I,J) = ZERO
   10             CONTINUE
   20         CONTINUE
          ELSE
              DO 40 J = 1,N
                  DO 30 I = 1,M
                      C(I,J) = BETA*C(I,J)
   30             CONTINUE
   40         CONTINUE
          END IF
          RETURN
      END IF
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Start the operations.
</span><span class="comment">*</span><span class="comment">
</span>      IF (NOTB) THEN
          IF (NOTA) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Form  C := alpha*A*B + beta*C.
</span><span class="comment">*</span><span class="comment">
</span>              DO 90 J = 1,N
                  IF (BETA.EQ.ZERO) THEN
                      DO 50 I = 1,M
                          C(I,J) = ZERO
   50                 CONTINUE
                  ELSE IF (BETA.NE.ONE) THEN
                      DO 60 I = 1,M
                          C(I,J) = BETA*C(I,J)
   60                 CONTINUE
                  END IF
                  DO 80 L = 1,K
                      IF (B(L,J).NE.ZERO) THEN
                          TEMP = ALPHA*B(L,J)
                          DO 70 I = 1,M
                              C(I,J) = C(I,J) + TEMP*A(I,L)
   70                     CONTINUE
                      END IF
   80             CONTINUE
   90         CONTINUE
          ELSE IF (CONJA) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Form  C := alpha*conjg( A' )*B + beta*C.
</span><span class="comment">*</span><span class="comment">
</span>              DO 120 J = 1,N
                  DO 110 I = 1,M
                      TEMP = ZERO
                      DO 100 L = 1,K
                          TEMP = TEMP + CONJG(A(L,I))*B(L,J)
  100                 CONTINUE
                      IF (BETA.EQ.ZERO) THEN
                          C(I,J) = ALPHA*TEMP
                      ELSE
                          C(I,J) = ALPHA*TEMP + BETA*C(I,J)
                      END IF
  110             CONTINUE
  120         CONTINUE
          ELSE
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Form  C := alpha*A'*B + beta*C
</span><span class="comment">*</span><span class="comment">
</span>              DO 150 J = 1,N
                  DO 140 I = 1,M
                      TEMP = ZERO
                      DO 130 L = 1,K
                          TEMP = TEMP + A(L,I)*B(L,J)
  130                 CONTINUE
                      IF (BETA.EQ.ZERO) THEN
                          C(I,J) = ALPHA*TEMP
                      ELSE
                          C(I,J) = ALPHA*TEMP + BETA*C(I,J)
                      END IF
  140             CONTINUE
  150         CONTINUE
          END IF
      ELSE IF (NOTA) THEN
          IF (CONJB) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Form  C := alpha*A*conjg( B' ) + beta*C.
</span><span class="comment">*</span><span class="comment">
</span>              DO 200 J = 1,N
                  IF (BETA.EQ.ZERO) THEN
                      DO 160 I = 1,M
                          C(I,J) = ZERO
  160                 CONTINUE
                  ELSE IF (BETA.NE.ONE) THEN
                      DO 170 I = 1,M
                          C(I,J) = BETA*C(I,J)
  170                 CONTINUE
                  END IF
                  DO 190 L = 1,K
                      IF (B(J,L).NE.ZERO) THEN
                          TEMP = ALPHA*CONJG(B(J,L))
                          DO 180 I = 1,M
                              C(I,J) = C(I,J) + TEMP*A(I,L)
  180                     CONTINUE
                      END IF
  190             CONTINUE
  200         CONTINUE
          ELSE
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Form  C := alpha*A*B'          + beta*C
</span><span class="comment">*</span><span class="comment">
</span>              DO 250 J = 1,N
                  IF (BETA.EQ.ZERO) THEN
                      DO 210 I = 1,M
                          C(I,J) = ZERO
  210                 CONTINUE
                  ELSE IF (BETA.NE.ONE) THEN
                      DO 220 I = 1,M
                          C(I,J) = BETA*C(I,J)
  220                 CONTINUE
                  END IF
                  DO 240 L = 1,K
                      IF (B(J,L).NE.ZERO) THEN
                          TEMP = ALPHA*B(J,L)
                          DO 230 I = 1,M
                              C(I,J) = C(I,J) + TEMP*A(I,L)
  230                     CONTINUE
                      END IF
  240             CONTINUE
  250         CONTINUE
          END IF
      ELSE IF (CONJA) THEN
          IF (CONJB) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Form  C := alpha*conjg( A' )*conjg( B' ) + beta*C.
</span><span class="comment">*</span><span class="comment">
</span>              DO 280 J = 1,N
                  DO 270 I = 1,M
                      TEMP = ZERO
                      DO 260 L = 1,K
                          TEMP = TEMP + CONJG(A(L,I))*CONJG(B(J,L))
  260                 CONTINUE
                      IF (BETA.EQ.ZERO) THEN
                          C(I,J) = ALPHA*TEMP
                      ELSE
                          C(I,J) = ALPHA*TEMP + BETA*C(I,J)
                      END IF
  270             CONTINUE
  280         CONTINUE
          ELSE
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Form  C := alpha*conjg( A' )*B' + beta*C
</span><span class="comment">*</span><span class="comment">
</span>              DO 310 J = 1,N
                  DO 300 I = 1,M
                      TEMP = ZERO
                      DO 290 L = 1,K
                          TEMP = TEMP + CONJG(A(L,I))*B(J,L)
  290                 CONTINUE
                      IF (BETA.EQ.ZERO) THEN
                          C(I,J) = ALPHA*TEMP
                      ELSE
                          C(I,J) = ALPHA*TEMP + BETA*C(I,J)
                      END IF
  300             CONTINUE
  310         CONTINUE
          END IF
      ELSE
          IF (CONJB) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Form  C := alpha*A'*conjg( B' ) + beta*C
</span><span class="comment">*</span><span class="comment">
</span>              DO 340 J = 1,N
                  DO 330 I = 1,M
                      TEMP = ZERO
                      DO 320 L = 1,K
                          TEMP = TEMP + A(L,I)*CONJG(B(J,L))
  320                 CONTINUE
                      IF (BETA.EQ.ZERO) THEN
                          C(I,J) = ALPHA*TEMP
                      ELSE
                          C(I,J) = ALPHA*TEMP + BETA*C(I,J)
                      END IF
  330             CONTINUE
  340         CONTINUE
          ELSE
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">           Form  C := alpha*A'*B' + beta*C
</span><span class="comment">*</span><span class="comment">
</span>              DO 370 J = 1,N
                  DO 360 I = 1,M
                      TEMP = ZERO
                      DO 350 L = 1,K
                          TEMP = TEMP + A(L,I)*B(J,L)
  350                 CONTINUE
                      IF (BETA.EQ.ZERO) THEN
                          C(I,J) = ALPHA*TEMP
                      ELSE
                          C(I,J) = ALPHA*TEMP + BETA*C(I,J)
                      END IF
  360             CONTINUE
  370         CONTINUE
          END IF
      END IF
<span class="comment">*</span><span class="comment">
</span>      RETURN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     End of <a name="CGEMM.412"></a><a href="cgemm.f.html#CGEMM.1">CGEMM</a> .
</span><span class="comment">*</span><span class="comment">
</span>      END

</pre>

 </body>
</html>
